<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>两面反转的盒子</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            perspective: 500px;
            background-color: #ccc;
        }

        .box {

            position: relative;
            width: 300px;
            height: 300px;
            margin: 100px auto;
            transition: all 1s;
            /* 让盒子保留立体空间 */
            transform-style: preserve-3d;
        }

        .box:hover {
            transform: rotateY(180deg);
        }

        .front,
        .back {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            line-height: 300px;
            text-align: center;
            letter-spacing: 10px;
            font-size: 26px;
        }

        .front {
            z-index: 1;
            background-color: black;
            color: white;
        }

        .back {
            background-color: white;
            color: black;
            transform: rotateY(180deg);
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="front">言语不起作用</div>
        <div class="back">想看到具体行动</div>
    </div>
</body>

</html>